# 界面主题配置
from tkinter import ttk

def apply_theme(root):
    """应用自定义主题"""
    style = ttk.Style(root)
    # 添加到apply_theme函数中
    style.configure('Treeview', rowheight=30, font=('Arial', 10))
    style.configure('Treeview.Heading', font=('Arial', 10, 'bold'))

    style.theme_create("custom", parent="alt", settings={
        "TFrame": {"configure": {"background": "#F0F8FF"}},
        "TButton": {
            "configure": {
                "padding": 5,
                "background": "#4682B4",
                "foreground": "white"
            },
            "map": {
                "background": [("active", "#36648B")]
            }
        }
    })
    style.theme_use("custom")